﻿namespace Entities
{
    public class ELookUp  : EBase
    {
        #region - Properties -

        public int Value {get; set;}
        public string Text { get; set; }
        public LookUpType Type { get; set; }
        public ELookUp LookUp { get; set; }

        #endregion

        #region - Overrides -

        public override string ToString()
        {
            return Text;
        }

        public override bool Equals(object obj)
        {
            if (!(obj is ELookUp))
                return false;

            ELookUp lookUp = obj as ELookUp;

            return lookUp.Type == Type && lookUp.Value == Value;
        }

        public override int GetHashCode()
        {
            return Type.GetHashCode() + Value.GetHashCode();
        }

        #endregion
    }

    public class ETransformerLookUp : EBase
    {
        #region - Properties -

        public string Text { get; set; }
        public TransformerLookUpType Type { get; set; }

        #endregion

        #region - Overrides -

        public override string ToString()
        {
            return Text;
        }

        public override bool Equals(object obj)
        {
            if (!(obj is ETransformerLookUp))
                return false;

            ETransformerLookUp lookUp = obj as ETransformerLookUp;

            return lookUp.Type == Type && lookUp.Id == Id;
        }

        public override int GetHashCode()
        {
            return Type.GetHashCode() + Id.GetHashCode();
        }

        #endregion
    }
}
